<template>
  <div class="app-container">
    <div
      v-show="
        !modifyInfo.visible &&
        !detailInfo.visible &&
        !purchAppDetailinfo.visible &&
        !detailListInfo.visible
      "
    >
      <!-- 条件栏 -->
      <div class="filter-wrapper">
        <new-page-filter
          v-model:query="filterInfo.query.queryMap"
          :query-more-json="true"
          :filter-list="filterInfo.searchList"
          :filter-btn="filterInfo.searchBtn"
          :clear-type="clearType"
          :slipSelectRequest="slipSelectRequest"
        >
        </new-page-filter>
        <el-button @click="detailListInfo.visible = true">明细页</el-button>
      </div>
      <div class="filter-wrapper">
        <new-page-filter :filter-btn="filterInfo.btnList">
          <template v-slot:filter-revoke>
            <el-button
              :disabled="!canRevoke"
              @click="handelMethodRequest(undefined, 'revoke')"
              >撤回
            </el-button>
          </template>
          <template v-slot:filter-cancelAudit>
            <el-button
              :disabled="!canCancelAudit"
              @click="handelMethodRequest(undefined, 'cancelAudit')"
              >销审
            </el-button>
          </template>
          <template v-slot:filter-check>
            <el-button
              :disabled="!canCheck"
              @click="handelMethodRequest(undefined, 'ratify')"
              >批准
            </el-button>
          </template>
          <template v-slot:filter-submit>
            <el-button
              :disabled="!canSubmit"
              @click="handelMethodRequest(undefined, 'submit')"
              >提交
            </el-button>
          </template>
          <template v-slot:filter-print>
            <PopoverPrint
              ref="popoverShow"
              v-model:popoverVisible="popoverVisible"
              :canPrint="canPrint"
              :templateArr="templateArr"
              @tempClick="tempClick"
              @print="print"
            ></PopoverPrint>
          </template>
          <template v-slot:filter-excel>
            <el-button :disabled="!canExcel" @click="exportExcel()"
              >导出excel</el-button
            >
          </template>
        </new-page-filter>
        <div class="display-flex">
          <el-button @click="preferenceInfo.visible = true">偏好设置</el-button>
        </div>
      </div>
      <!-- 表格 -->
      <table-container
        :refresh="tableInfo.refresh"
        :init-curpage="tableInfo.initCurpage"
        v-model:data="tableInfo.data"
        :api="tableInfo.api"
        :query="filterInfo.query"
        :field-list="tableInfo.fieldList"
        :handle="tableInfo.handle"
        :row-class-name="tableRowClassName"
        @pageInfo="pageInfo"
        @handleEvent="handleEvent"
      >
        <template v-slot:col-orderNo="scope">
          <span
            v-if="$permission('purchInvoiceOrder:detail')"
            class="slip-edit"
            @click="showDetail(scope.row)"
            >{{ scope.row.orderNo || '-' }}</span
          >
          <span v-else>{{ scope.row.orderNo || '-' }}</span>
        </template>
      </table-container>
    </div>
    <!-- 新增或修改 -->
    <asset-purch-order-modify
      v-if="modifyInfo.visible"
      v-model:visible="modifyInfo.visible"
      :title="modifyInfo.title"
      :orderId="modifyInfo.orderId"
      :contract-id="modifyInfo.contractId"
      :contract-no="modifyInfo.contractNo"
      :table-data="modifyInfo.tableData"
      :tableKey="modifyInfo.tableKey"
      @returnModify="returnModify"
    />
    <asset-purch-order-detail
      v-if="detailInfo.visible"
      v-model:visible="detailInfo.visible"
      :orderId="detailInfo.orderId"
      :invoiceType="detailInfo.invoiceType"
      @returnBack="getList"
    />
    <set-preference
      v-if="preferenceInfo.visible"
      v-model:visible="preferenceInfo.visible"
      :search-list="filterInfo.searchList"
      :field-list="tableInfo.fieldList"
      :customize-user-v-o="filterInfo.query.customizeUserVO"
      :group-level-show="false"
      @callback="setPreferenceCallback"
    />
    <advanced-search
      v-if="advancedSearchInfo.visible"
      v-model:visible="advancedSearchInfo.visible"
      v-model:form-data="advancedSearchInfo.data"
      :field-list="tableInfo.fieldList"
      @callback="advancedSearchCallback"
    />
    <detailList
      v-if="detailListInfo.visible"
      v-model:visible="detailListInfo.visible"
      @callback="getList"
    ></detailList>

    <page-dialog
      v-show="dialogInfo.visible"
      :title="dialogInfo.title"
      v-model:visible="dialogInfo.visible"
      :width="dialogInfo.width"
      :bt-loading="dialogInfo.btLoading"
      :bt-list="dialogInfo.btList"
    >
      <div class="asset-msg">
        <div class="asset-msg-label">
          <i class="el-icon-warning"></i>{{ dialogInfo.msg }}：
        </div>
        <el-radio-group v-model="dialogInfo.flag">
          <el-radio :label="true">当前页数据</el-radio>
          <el-radio :label="false">全部页数据</el-radio>
        </el-radio-group>
      </div>
    </page-dialog>
  </div>
</template>

<script setup name="purchInvoice">
import {
  getPurchInvoiceOrderCustomizeListPage,
  methodPurchInvoiceOrder,
  removePurchInvoiceOrder,
  printPurchInvoiceOrder,
  exportPurchInvoiceOrder,
} from '@/api/asset.js'
import { getSupplierAll } from '@/api/core'
import { selectByCodeAndDept } from '@/api/report.js'
import { doPrint } from '@/utils/exportUtil.js'
import { getCustomizeSetting, updateUserCustomize } from '@/api/customize'
import { fatchTemplateByCode } from '@/api/base'
import { getBusinessKeyById } from '@/api/flowable'
const detailList = defineAsyncComponent(() => import('./detailList'))
const AssetPurchOrderModify = defineAsyncComponent(() => import('./modify'))
const AssetPurchOrderDetail = defineAsyncComponent(() => import('./detail'))

const { proxy } = getCurrentInstance()
const popoverVisible = ref(false)
const templateArr = ref([])

const dialogInfo = ref({
  visible: false,
  title: '提示',
  btLoading: false,
  type: '',
  msg: '',
  width: '400px',
  flag: true,
  btList: [
    {
      label: '关闭',
      event: handleClose,
      show: true,
    },
    {
      label: '打印',
      type: 'primary',
      event: checkConfirm,
      show: true,
    },
  ],
})
const listTypeInfo = ref({
  supplierList: [],
  typeList: [],
})
const modifyTaleKey = ref(
  'assetPurchInvoiceOrderDetailModifyList-com.slip.spd.entity.vo.asset.AssetPurchInvoiceOrderDetailVO'
)
const filterInfo = ref({
  query: {
    sortString: '',
    customizeUserVO: {},
    queryMap: {
      deptAuth: {
        asTbName: 'asset_purch_invoice_order',
        columnName: 'dept_id',
        queryType: 'IN',
        queryCategory: 'AND',
        value: 'deptAuth',
      },
      supplierAuth: {
        asTbName: 'asset_purch_invoice_order',
        columnName: 'supplier_id',
        queryType: 'IN',
        queryCategory: 'AND',
        value: 'supplierAuth',
      },
    },
  },
  searchList: [],
  btnList: [
    {
      type: 'button',
      label: '新增',
      event: create,
      show: proxy.$permission('purchInvoiceOrder:add'),
    },
    {
      type: 'slot',
      value: 'submit',
      show: proxy.$permission('purchInvoiceOrder:submit'),
    },
    {
      type: 'slot',
      value: 'check',
      show:
        proxy.$permission('purchInvoiceOrder:check') &&
        proxy.$store.state.permission.systemConfig
          .allow_asset_purch_invoice_order_approval == 1,
    },
    {
      type: 'slot',
      value: 'revoke',
      show: proxy.$permission('purchInvoiceOrder:revoke'),
    },
    {
      type: 'slot',
      value: 'cancelAudit',
      show: proxy.$permission('purchInvoiceOrder:cancelAudit'),
    },
    {
      type: 'slot',
      value: 'print',
      show: proxy.$permission('purchInvoiceOrder:printList'),
    },
    {
      type: 'slot',
      value: 'excel',
      show: proxy.$permission('purchInvoiceOrder:excel'),
    },
  ],
  searchBtn: [
    { type: 'button', label: '搜索', event: search },
    { type: 'button', label: '高级查询', event: advancedSearchShow },
    { type: 'button', label: '重置', event: clearSearch },
  ],
})
// 表格相关
const tableInfo = ref({
  refresh: 1,
  initCurpage: 1,
  data: [],
  selections: [],
  fieldList: [],
  handle: {
    fixed: 'right',
    label: '操作',
    width: '100',
    btList: [
      // 1 待提交  3 待审批  4 已完成  5 已驳回  17 已拒绝  18 审批中
      {
        label: '修改',
        event: update,
        show: proxy.$permission('purchInvoiceOrder:update'),
        ifRender: function (row) {
          return row.status === 1 || row.status === 5
        },
      },
      {
        label: '提交',
        event: (row) => handelMethodRequest(row, 'submit'),
        show: proxy.$permission('purchInvoiceOrder:submit'),
        ifRender: function (row) {
          return row.status === 1 || row.status === 5
        },
      },
      {
        label: '撤回',
        event: (row) => handelMethodRequest(row, 'revoke'),
        show: proxy.$permission('purchInvoiceOrder:revoke'),
        ifRender: ifRenderRevoke,
      },
      {
        label: '销审',
        event: (row) => handelMethodRequest(row, 'cancelAudit'),
        show: proxy.$permission('purchInvoiceOrder:cancelAudit'),
        ifRender: ifRenderCancelAudit,
      },
      {
        label: '批准',
        event: (row) => handelMethodRequest(row, 'ratify'),
        show:
          proxy.$permission('purchInvoiceOrder:check') &&
          proxy.$store.state.permission.systemConfig
            .allow_asset_purch_invoice_order_approval == 1,
        ifRender: function (row) {
          return row.status === 3
        },
      },
      {
        label: '拒绝',
        event: (row) => handelMethodRequest(row, 'refuse'),
        show:
          proxy.$permission('purchInvoiceOrder:refuse') &&
          proxy.$store.state.permission.systemConfig
            .allow_asset_purch_invoice_order_approval == 1,
        ifRender: function (row) {
          return row.status === 3 || row.status === 18
        },
      },
      {
        label: '驳回',
        event: (row) => handelMethodRequest(row, 'reject'),
        show:
          proxy.$permission('purchInvoiceOrder:reject') &&
          proxy.$store.state.permission.systemConfig
            .allow_asset_purch_invoice_order_approval == 1,
        ifRender: function (row) {
          return row.status === 3
        },
      },
      {
        label: '删除',
        event: remove,
        show: proxy.$permission('purchInvoiceOrder:delete'),
        ifRender: function (row) {
          return row.status === 1 || row.status === 5
        },
      },
    ],
  },
})

//明细相关
const detailInfo = ref({
  visible: false,
  orderId: '',
  invoiceType: '',
})
const purchAppDetailinfo = ref({
  visible: false,
  title: '申购单明细',
  data: {},
})
//新增或更新相关
const modifyInfo = ref({
  visible: false,
  title: '',
  orderId: '',
  tableKey: '',
  contractId: '',
  contractNo: '',
  tableData: [],
})
const licencesSystemConfig = ref('')
const page = ref({})
const groupFlag = ref(undefined)
const lastReceiveTime = ref(undefined)
const purchTime = ref(undefined)
const advancedSearchInfo = ref({
  visible: false,
  data: {},
})
const detailListInfo = ref({
  visible: false,
})
const preferenceInfo = ref({
  visible: false,
})
const clearType = ref(true)
const slipSelectRequest = ref(true)

const canPrint = computed(() => {
  return !groupFlag.value
})
const canExcel = computed(() => {
  return !groupFlag.value
})
const canSubmit = computed(() => {
  return (
    tableInfo.value.selections.length &&
    !tableInfo.value.selections.filter((item) => item.status !== 1).length
  )
})
const canCheck = computed(() => {
  return (
    tableInfo.value.selections.length &&
    !tableInfo.value.selections.filter((item) => item.status !== 3).length
  )
})
const canRevoke = computed(() => {
  return (
    tableInfo.value.selections.filter(
      (item) =>
        item.status === 3 ||
        (item.status === 4 &&
          proxy.$store.state.permission.systemConfig
            .allow_asset_purch_invoice_order_approval == 0)
    ).length !== 0 &&
    tableInfo.value.selections.filter(
      (item) => item.status !== 3 && item.status !== 4
    ).length === 0
  )
})
const canCancelAudit = computed(() => {
  return (
    tableInfo.value.selections.filter(
      (item) =>
        item.status === 4 &&
        proxy.$store.state.permission.systemConfig
          .allow_asset_purch_invoice_order_approval !== 0
    ).length !== 0 &&
    tableInfo.value.selections.filter((item) => item.status !== 4).length === 0
  )
})

watch(
  () => filterInfo.value.query.lastReceiveTimeGreater,
  (val) => {
    if (!val) {
      lastReceiveTime.value = null
    }
  }
)
watch(
  () => filterInfo.value.query.purchTimeGreater,
  (val) => {
    if (!val) {
      purchTime.value = null
    }
  }
)
watch(
  () => proxy.$router.currentRoute.value.name,
  (to, from) => {
    if (!from) return
    if (
      from.includes('myPendingDetail') ||
      from.includes('myFinishedDetail') ||
      from.includes('myApplyDetail')
    ) {
      getList()
    }
  },
  {
    deep: true,
  }
)

onMounted(() => {
  let list = proxy.$store.state.permission.dict['purch_order_status']
  if (list != undefined && list != null && list.length > 0) {
    listTypeInfo.value.typeList = list.map((item) => {
      return {
        value: item.code,
        key: item.name,
      }
    })
  }
})

setData()
function setData() {
  let obj = {
    statusValue: {
      label: '状态',
      value: 'statusValue',
      asValue: 'status',
      componentType: 'select-model',
      code: 'asset_purch_invoice_order_status',
      show: false,
      hidden: true,
    },
    supplierName: {
      label: '供应商',
      value: 'supplierName',
      asValue: 'supplierId',
      componentType: 'slip-select',
      api: getSupplierAll,
      query: {
        supplierAuth: 'supplierId',
        sort: 'create_time desc',
      },
      clearable: true,
      filterable: true,
      keyField: 'supplierName',
      valueField: 'supplierId',
      show: false,
      hidden: true,
    },
  }
  tableInfo.value.fieldList = Object.values({
    ...proxy.$fn.deepClone(proxy.$fieldfList.FieldList),
    ...proxy.$fn.deepClone(obj),
  })
  filterInfo.value.searchList = Object.values({
    ...proxy.$fn.deepClone(proxy.$fieldfList.FieldList),
    ...proxy.$fn.deepClone(obj),
  })
  getCustomize()
}
function pageInfo(obj) {
  page.value = obj
}
function setPreferenceCallback(obj) {
  updateUserCustomize(obj.customizeUserVO).then((res) => {
    if (res && res.success) {
      getCustomize(!slipSelectRequest.value)
    }
  })
}
function tableRowClassName({ row }) {
  let rowId = sessionStorage.getItem('storeRowId')
  if (rowId && row.id === Number(rowId)) {
    return 'check-row'
  }
  return ''
}
function ifRenderRevoke(row) {
  return (
    row.status === 3 ||
    (row.status === 4 &&
      proxy.$store.state.permission.systemConfig
        .allow_asset_purch_invoice_order_approval == 0)
  )
}
function ifRenderCancelAudit(row) {
  return (
    row.status === 4 &&
    proxy.$store.state.permission.systemConfig
      .allow_asset_purch_invoice_order_approval != 0
  )
}

function returnModify() {
  if (modifyInfo.value.orderId) {
    getList()
  } else {
    search()
  }
}
// 创建
function create() {
  modifyInfo.value.visible = true
  modifyInfo.value.title = '新增采购发票'
  modifyInfo.value.orderId = ''
  modifyInfo.value.contractNo = ''
  modifyInfo.value.contractId = ''
  modifyInfo.value.tableData = []
  modifyInfo.value.tableKey = modifyTaleKey.value
}
// 编辑
function update(row) {
  getBusinessKeyById({
    businessKey: row.orderNo,
    businessType: 'assetPurchInvoice',
  }).then((res) => {
    if (res.success) {
      sessionStorage.setItem('storeRowId', row.id)
      if (res.data?.processInstanceId) {
        proxy.$fn.setFlowData(res.data, '', proxy.$route)
      } else {
        modifyInfo.value.visible = true
        modifyInfo.value.title = '修改采购发票'
        modifyInfo.value.orderId = row.id
        modifyInfo.value.contractNo = ''
        modifyInfo.value.contractId = ''
        modifyInfo.value.tableData = []
        modifyInfo.value.tableKey = modifyTaleKey.value
      }
    }
  })
}
// 获取列表
async function getList() {
  tableInfo.value.refresh = Math.random()
}
//删除
function remove(row) {
  const data = []
  data.push(row.id)
  removePurchInvoiceOrder([row.id]).then((resp) => {
    if (resp && resp.success) {
      getList()
    }
  })
}
// 触发事件
function handleEvent(event, data) {
  switch (event) {
    case 'tableCheck':
      tableInfo.value.selections = [...data]
      break
  }
}
//展示明细
function showDetail(row) {
  getBusinessKeyById({
    businessKey: row.orderNo,
    businessType: 'assetPurchInvoice',
  }).then((res) => {
    if (res.success) {
      sessionStorage.setItem('storeRowId', row.id)
      if (res.data?.processInstanceId) {
        proxy.$fn.setFlowData(res.data, '', proxy.$route)
      } else {
        detailInfo.value.orderId = row.id
        detailInfo.value.visible = true
        detailInfo.value.invoiceType = row.invoiceType
      }
    }
  })
}

async function advancedSearchCallback(obj) {
  filterInfo.value.query.queryMap = {}
  let arr = []
  filterInfo.value.query.queryDtoList = [...obj.queryDtoList, ...arr]
  advancedSearchInfo.value.data = obj.data
  await getList()
  clearType.value = !clearType.value
  filterInfo.value.query.queryMap = proxy.$fn.deepClone(
    filterInfo.value.copyQueryMap
  )
}
function handelMethodRequest(row = undefined, method) {
  const ids = getIds(row)
  if (
    method === 'submit' &&
    proxy.$store.state.permission.systemConfig
      .allow_asset_purch_invoice_order_approval == 2
  ) {
    let data = {
      flowTaskCommentDto: { approvalType: 'submit' },
      processDefinitionKey: 'assetPurchInvoice',
      orderIds: ids,
    }
    methodPurchInvoiceOrder(data, 'flowSubmit').then((resp) => {
      if (resp && resp.success) {
        getCustomize()
      }
    })
  } else if (method === 'reject') {
    proxy
      .$prompt('请输入驳回理由', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        inputValidator: proxy.$fn.maxString200,
        inputErrorMessage: '驳回理由不能超过200字符',
      })
      .then(({ value }) => {
        const data = {
          id: row.id,
          orderId: row.id,
          checkOpt: value,
        }
        methodPurchInvoiceOrder(data, method).then((resp) => {
          if (resp && resp.success) {
            getList()
          }
        })
      })
  } else if (method === 'refuse') {
    proxy
      .$prompt('请输入拒绝理由', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        inputValidator: proxy.$fn.maxString200,
        inputErrorMessage: '拒绝理由不能超过200字符',
      })
      .then(({ value }) => {
        const data = {
          id: row.id,
          orderId: row.id,
          checkOpt: value,
        }
        methodPurchInvoiceOrder(data, method).then((resp) => {
          if (resp && resp.success) {
            getCustomize()
          }
        })
      })
  } else if (method === 'stop') {
    proxy
      .$prompt('请输入中止原因', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        inputValidator: proxy.$fn.isNotEmptyString,
        inputErrorMessage: '请输入中止原因并不超过200字符',
      })
      .then(({ value }) => {
        const data = {
          ids: ids,
          stopReason: value,
        }
        methodPurchInvoiceOrder(data, method).then((resp) => {
          if (resp && resp.success) {
            getCustomize()
          }
        })
      })
  } else {
    methodPurchInvoiceOrder(ids, method).then((resp) => {
      if (resp.success) {
        tableInfo.value.refresh = Math.random()
      }
    })
  }
}
function getIds(row = undefined) {
  let ids = []
  if (row) {
    ids.push(row.id)
  } else {
    ids = tableInfo.value.selections.map((row) => row.id)
  }
  return ids
}
function handleClose() {
  dialogInfo.value.visible = false
}
function checkConfirm() {
  if (dialogInfo.value.type === 'excel') {
    exportExcelList()
  } else if (dialogInfo.value.type === 'print') {
    printList()
  }
  dialogInfo.value.visible = false
  dialogInfo.value.msg = ''
}
function exportExcel() {
  dialogInfo.value.visible = true
  dialogInfo.value.type = 'excel'
  dialogInfo.value.msg = '请选择数据导出范围'
  dialogInfo.value.btList[1].label = '导出'
  dialogInfo.value.flag = true
}
function exportExcelList() {
  let params = {
    ...filterInfo.value.query,
    ...page.value,
    page: dialogInfo.value.flag,
  }
  exportPurchInvoiceOrder(params).then((resp) => {
    if (resp) {
      proxy.$fn.parseExcel(resp)
    }
  })
}
async function print() {
  dialogInfo.value.visible = true
  dialogInfo.value.type = 'print'
  dialogInfo.value.msg = '请选择当数据打印范围'
  dialogInfo.value.btList[1].label = '打印'
  dialogInfo.value.flag = true
}
function tempClick(item) {
  doPrint({
    name: item.ureportName,
    params: {
      ...filterInfo.value.query,
    },
    callback: printCallback,
    data: {},
  })
  popoverVisible.value = false
}

function printCallback() {
  try {
    // 打印成功增加打印次数
    // updatePrintCount({
    //   orderNo: infoList.value.data.orderNo,
    //   orderId: props.orderId,
    //   tempCode: 'paymentDeatil',
    //   orderType: 0,
    // })
  } catch (error) {}
}

//打印
function printList() {
  selectByCodeAndDept({
    tempCode: 'AssetPurchInvoiceOrderList',
  }).then((res) => {
    if (res && res.success) {
      templateArr.value = res.data
      popoverVisible.value = true
      // 一条数据则直接打印
      if (templateArr.value.length === 1) {
        console.log(proxy.$refs.popoverShow)
        proxy.$refs.popoverShow.hidePopover()
        doPrint({
          name: templateArr.value[0].ureportName,
          params: {},
          callback: printCallback,
          data: {
            customParam: JSON.stringify({
              ...filterInfo.value.query,
              ...page.value,
              page: dialogInfo.value.flag,
            }),
          },
        })
      }
    }
  })
}

// 搜索
function search() {
  // 重置分页
  advancedSearchInfo.value.data = {}
  filterInfo.value.query.queryDtoList = []
  tableInfo.value.initCurpage = Math.random()
  tableInfo.value.refresh = Math.random()
}
function getCustomize(_slipSelectRequest = true) {
  let param = {
    tableKey:
      'assetPurchInvoiceOrderList-com.slip.spd.entity.vo.asset.AssetPurchInvoiceOrderVO',
  }
  getCustomizeSetting(param).then((res) => {
    if (res && res.success) {
      let data = res.data
      filterInfo.value.query.customizeUserVO = data
      tableInfo.value.fieldList = proxy.$fn.setFieldList(
        tableInfo.value.fieldList,
        data.detail
      )
      let searchInfo = proxy.$fn.setSearchList(
        filterInfo.value.searchList,
        data.detail
      )
      filterInfo.value.query.queryMap = {
        ...searchInfo.queryMap,
        ...filterInfo.value.query.queryMap,
      }
      filterInfo.value.searchList = searchInfo.searchList
      filterInfo.value.searchList.forEach((item) => {
        item.event = search
      })
      filterInfo.value.copyQueryMap = proxy.$fn.deepClone(
        filterInfo.value.query.queryMap
      )
      slipSelectRequest.value = _slipSelectRequest
      tableInfo.value.api = getPurchInvoiceOrderCustomizeListPage
      getList()
    }
  })
}
function advancedSearchShow() {
  advancedSearchInfo.value.visible = true
}
function clearSearch() {
  clearType.value = !clearType.value
  advancedSearchInfo.value.data = {}
  filterInfo.value.query.queryMap = proxy.$fn.deepClone(
    filterInfo.value.copyQueryMap
  )
  search()
}
</script>

<style scoped lang="scss">
:deep(.el-table) {
  .nearly-row {
    background: #fceacb;
  }
  .expire-row {
    background: #f5e4e4;
  }
}
</style>
